****Replication Files for Do Violations of Democratic Northc Change Political Attitudes
****American Politics Research 2023 online
****Posted online on  2023-12-11
****Timothy Frye
****tmf2@columbia.edu


***US Survey January 2021

clear
**use "C:\Users\timfr\Dropbox\us_survey2.dta" 
use "C:\Users\timfr\Dropbox\jan 6 paper\us_survey2.dta"

*svyset[pweight = weight_bls_emp_01] 

**employment status **
gen employ_type = q1
gen selfemployed = q1
recode selfemployed 2=0 3=0 4=0  

gen privemployed = q1
recode privemployed 1=0 2=1 3=0 4=0  

gen stateemployed =q1
recode stateemployed 1= 0 2=0 3=1 4=0  

gen ngoemployed =q1
recode ngoemployed 2=0 3=0 4=1  

gen worksize = q2
recode worksize 6=.

gen companysize = q2
recode companysize 6=.

gen sector = q4
 recode sector 23=.
gen yrswork = q5a 
gen skills = q5b
 recode skills 8=1
 
 
 **** Political Attitudes** 

 gen elecfree = q19_s
recode elecfree 1=4 2=3 3=2 4=1

gen ballotinsec = q21_s

gen trumptherm = q28_s

gen trumpthermplus = q28b_s

**interference

gen russinter2016 = q30_s
gen russinf2016 = q31_s
gen russinter2020 = q32_s
gen russinf2020 = q33_s

**demographics 

gen male = gender
recode male 2=0

gen white = race
recode white 2=0 3=0 4=0 5=0 6=0 7 =0 8=0 
gen black = race
recode black 1=0  2=1 3=0 4=0 5=0 6=0 7 =0 8=0 
gen hispanic = race
recode hispanic 1=0  2=0 3=1 4=0 5=0 6=0 7 =0 8=0 
 
gen age = 2020-birthyr

gen familyinc = faminc
recode familyinc 97=. 

**income dummies**
gen inc1 = 0
replace inc1 =1 if familyinc<4 &familyinc~=.
replace inc1 = . if missing(familyinc)

gen inc2 = 0
replace inc2 =1 if familyinc>3 &familyinc<6 &familyinc~=.
replace inc2 = . if missing(familyinc)

gen inc3 =0
replace inc3 =1 if familyinc >5 &familyinc<9  &familyinc~=.
replace inc3 = . if missing(familyinc)
 
gen inc4 = 0
replace inc4 =1 if familyinc >8 &familyinc<11 &familyinc~=.
replace inc4 = . if missing(familyinc)

gen inc5 = 0
replace inc5 =1 if familyinc> 10 &familyinc~=.
replace inc5 = . if missing(familyinc)

gen missinc = familyinc
recode missinc .=1  1=0 2=0 3=0 4=0 5=0 6=0 7=0 8=0 9=0 10=0 11=0 12=0 13=0 14=0 15=0 16=0 
 
**party id 3 category*** 
gen demid = pid3
recode demid 2=0 3=0 4=. 5=.

gen repid = pid3 
recode repid 1=0 2=1 3=0 4=. 5=.

gen indid = pid3
recode  indid 1=0 2=0 3=1 4=. 5=.

**partyid 7 category**

gen pid8 = pid7 

gen pidmissing = pid8
recode pidmissing 1=0 2=0 3=0 4= 0 5=0 6=0 7=0 8 =1
 
recode pid7  8=.

gen repid7 =pid7
recode repid7 1=0 2=0 3=0 4=0 5=1 6=1 7=1 8=.

gen demid7 = pid7
recode demid7  2=1 3=1 4=0 5=0 6=0 7=0 8=.

gen indid7 = pid7
recode indid7 1=0 2=0 3=0 4=1 5=0 6=0 7=0 8=.

** very strong republican
gen vsrepid7 = pid7
recode vsrepid7 1=0 2=0 3=0 4=0 5=0 6=0 7=1 8=.

gen mrepid7 = pid7
recode mrepid7 1=0 2=0 3=0 4=0 5=0 6=1 7=0 8=.

gen lrepid7 = pid7
recode lrepid7 1=0 2=0 3=0 4=0 5=1 6=0 7=0 8=.

 gen lmrepid = mrepid + lrepid
 recode lmrepid 2=1

**strong republcan - no leaners***
gen srepid7 = pid7	
recode srepid7 1=0 2=0 3=0 4=0 5=0 6=1 7=1 8=.

**strong democrats -- no leaners**
gen sdemid7 = pid7
recode sdemid7 1=1 2=1 3=0 4=0 5=0 6=0 7=0 8=.

***types of democrats***
gen vsdemid7 = pid7
recode vsdemid7 1=1 2=0 3=0 4=0 5=0 6=0 7=0 8=.	

gen mdemid7 = pid7
recode mdemid7 1=0 2=1 3=0 4=0 5=0 6=0 7=0 8=.

gen ldemid7 = pid7
recode ldemid7 1=0 2=0 3=1 4=0 5=0 6=0 7=0 8=.

gen moderate = pid7
recode moderate  1= 0 2=0 3= 1 4=1 5 =1 6= 0 7=0

** gen extreme -- only strong dems and strong rs**  
gen exid7 = pid7
recode exid7 1=1 2=0 3=0 4=0 5=0 6=0 7=1 8=.

 
 gen swingid = pid7

 recode swingid 1= 0 2= 0 3= 1 4= 1 5=1 6 = 0 7=0
 
**marital status ** 
gen married = marstat
recode married 2=0 3=0 4=0 5=0 6=0 7=0 8=0 

**education**
gen nohs = educ
recode nohs 2=0 3=0 4=0 5=0 6=0 

gen highschool = educ
 recode highschool 1=0 2=1 3=0 4=0 5=0 6=0 
 
 gen somecollege = educ
 recode somecollege 1=0 2=0 3=1 4=0 5=0 6=0 
 
 gen twocollege = educ
  recode twocollege 1=0 2=0 3=0 4=1 5=0 6=0 
  
 gen fourcollege = educ
   recode fourcollege 1=0 2=0 3=0 4=0 5=1 6=0 
   
 gen postcollege = educ
    recode postcollege 1=0 2=0 3=0 4=0 5=0 6=1 
	
	
**ideology**
recode ideo5 6=.

**religion **
gen bornagain = pew_bornagain
recode bornagain 2=0 

gen churchatd = pew_churatd
recode churchatd 7=. 

*** region
tabulate inputstate, generate(s)

 **confederate states**
generate confed = 0
replace confed =1 if s1 ==1 |s10==1 | s11 ==1 | s19==1 | s34==1 | s41==1 | s43 ==1 |s44==1 | 47==1 


***gen regions
generate midwest = 0
replace midwest = 1 if s15==1 | s14 == 1 |s23 ==1 |s36==1| s50==1 | s15==1| s16==1| s24==1| s26 ==1 | s28==1| s35==1 |s42 ==1 

gen south = 0
replace south =1 if s8==1 | s9 == 1 |s10 ==1 |s11==1| s21==1 | s34==1| s41==1| s47==1| s49 ==1 | s1==1| s18==1 |s25 ==1 | s43==1| s4 ==1| s19==1| s37==1 |s44==1

gen west = 0
replace west =1 if s3==1 | s6 == 1 |s14 ==1 |s32==1| s27==1 | s45==1| s29==1| s2 ==1 | s5==1| s12==1 |s38 ==1 | s48 ==1

gen northeast =0
replace northeast =1 if s7==1 | s20 == 1 |s22==1 |s30==1| s40==1 | s46==1| s31==1| s33==1| s39 ==1   

**gen time zones
gen pacific = 0
replace pacific =1 if s5==1 |s48==1 | s38==1 | s29==1 |s1 ==1 | s12==1

gen mountain =0
replace mountain =1 if s27==1|  s13==1 | s45 == 1 |s4==1| s6==1 | s32==1     

gen central = 0 
replace central = 1 if s24==1 | s35 == 1 |s42 ==1 |s28==1| s17==1 | s37==1| s44==1| s16==1| s26 ==1 | s4==1| s19==1 |s50 ==1 |s14==1|s18==1| s43==1| s1==1| s25 ==1 

gen east = 0
replace east =1 if s23==1 | s15 == 1 |s36 ==1 |s11==1| s10==1 | s41==1| s34==1| s47==1| s49==1 | s8==1| s40==1 |s33 ==1 | s31==1| s46==1 | s7==1| s39==1| s20==1| s21==1 |s9==1 | s30==1

	
	
*****COUP Interviewed on Jan 6

**after 6 oclock**
gen postcoup6 = 0
replace postcoup6 = 1 if number >616

**after 7:00**
gen postcoup7 = 0
replace postcoup7 =1 if number >737

*after 8:00**
gen postcoup8 = 0
replace postcoup8 =1 if number >747

** after 9:00**
gen postcoup9 = 0
replace postcoup9 = 1 if number >793


** dummy variable for time between 9Am and 9PM
gen void = 1
replace void = 0 if number <597 | number> 793

***dummy variable for void between 9 AM and 8PM **
gen void8 = 1
replace void8 =0 if number <597 | number >747

gen void7 = 1
replace void7 =0 if number <597 | number >737

gen void6 = 1
replace void6 = 0 if number <597 | number >737


**trump feeling thermometer **
gen trumpthermall = trumptherm

replace trumpthermall = 7 if trumptherm == 1 & trumpthermplus==1
replace trumpthermall = 6 if trumptherm == 1 & trumpthermplus==2
replace trumpthermall = 5 if trumptherm == 1 & trumpthermplus==3
replace trumpthermall = 4 if trumptherm == 2
replace trumpthermall = 3 if trumptherm == 3 & trumpthermplus==3
replace trumpthermall = 2 if trumptherm == 3 & trumpthermplus==2
replace trumpthermall = 1 if trumptherm == 3 & trumpthermplus==1
 
gen dempostcoup9 = demid*postcoup9
gen reppostcoup9 = repid*postcoup9
gen indpostcoup9 = indid*postcoup9


****Vote Choice  
gen Bidenvote = presvote20post
recode Bidenvote 2=0 3=0 4=0 5=0 6=0

gen Trumpvote = presvote20post
recode Trumpvote 1=0 2=1 3=0 4=0 5=0 6=0

gen Bidenpost = Bidenvote*postcoup9

gen Trumppost = Trumpvote*postcoup9


**create pid and coup interaction 
gen demid7postcoup9 = demid7*postcoup9
gen repid7postcoup9 = repid7*postcoup9
gen indid7postcoup9 = indid7*postcoup9



***age by category
gen young = 0
replace young = 1 if age <35

gen midage = 0
replace midage = 1 if age >34 & age <50

gen latemidage = 0
replace latemidage = 1 if age >49 & age <65

gen oldage = 0
replace oldage = 1 if age >64

 
***introducing party Id data from outside the January survey ***
**npid7pre is prior party identification taken from most recent survey
**npid7post is party id in next survey after the coup
label define npid7pre  1 "Strong Democrat" 2  "Not very strong Democrat"   3 "Lean Democrat" 4 "Independent" 5 "Lean Republican" 6 "Not very strong Republican"  7 "Strong Republican" 8 "Not sure" 9 "No Data"  10 "Dont know"

*label define npid7pre 1 "Dont know" 2  "Independent"   3 "Lean Democrat" 4 "Lean Republican" 5 "No Data" 6 "Not Sure"  7 "Not very strong Democrat" 8 "Not very strong Republican" 9 "Strong Democrat" 10 "Strong Republican"

*Don't Know "Strong Democrat" Independent "Not very strong Democrat"  Lean Democrat "Lean Democrat" Lean Republican "Independent" No Data "Lean Republican" Not Sure "Not very strong Republican" Not very strong Democrat "Strong Republican"

encode pid7_prejan, generate (npid7pre)

recode npid7pre 8 =. 9=. 10=. 11=.

recode npid7pre 3= 5 4=7 5 =6 6=4 7=3

*recode npid7pre 2= 4 3=3 4=5 5=. 7=2 8=6 9=1 10=7 11=. 12=.

*recode npid7pre 1=. 2 =4 3= 3 4= 5 5= . 6=. 7 =2 8 = 6 9 = 1 10 =7

**dummy for missing data" 
gen nonpid7pre = npid7pre
recode nonpid7pre 1=0 2=0 3=0 4=0 5=0 6=0 7=0 8= 0 9=1 10=0 .=1
 
*** examine the different encoding strategies here with pid7pre and pid7post

*label define pid7pre 1 "Strong Democrat" 2  "Not very strong Democrat"   3 "Lean Democrat" 4 "Independent" 5 "Lean Republican" 6 "Not very strong Republican"  7 "Strong Republican" 8 "Not sure" 9 "No Data"  10 "Dont know"

 
*encode pid7_prejan, generate (pid7pre)
 
*gen pid7pre7 = pid7pre
 
 ****check coding****
 * recode pid7pre7 11 =. 9= . 8= . 7=3 6=4 5=6 4=7  3= 5
 
* label define npid7post 1 "Dont know" 2  "Independent"   3 "Lean Democrat" 4 "Lean Republican" 5 "No Data" 6 "Not Sure"  7 "Not very strong Democrat" 8 "Not very strong Republican" 9 "Strong Democrat" 10 "Strong Republican"

label define npid7post 1 "Strong Democrat" 2  "Not very strong Democrat"   3 "Lean Democrat" 4 "Independent" 5 "Lean Republican" 6 "Not very strong Republican"  7 "Strong Republican" 8 "Not sure" 9 "No Data"  10 "Dont know" 
**1 "Dont know" 2  "Independent"   3 "Lean Democrat" 4 "Lean Republican" 5 "No Data" 6 "Not Sure"  7 "Not very strong Democrat" 8 "Not very strong Republican" 9 "Strong Democrat" 10 "Strong Republican"

encode pid7_postjan, generate (npid7post)
recode npid7post 8 =. 9=. 10=. 11=.

recode npid7post 3= 5 4=7 5 =6 6=4 7=3

*recode npid7post 2= 4 3= 3 4= 5 5=. 7=2 8= 6 9=1 10=2 11=.  

*gen pid7post7 = pid7post
**recode pid7post7 1=. 2=4 3=3 4=5 5=. 6=. 7=2 8=6 9=1 10=7 11=.



 **missing prior party id
 gen missingpid7pre = 0
 replace missingpid7pre =1 if npid7pre==.
 
 
generate npidchange13 =0
replace npidchange13 = 1 if npid7pre~=npid7post

generate ndemchange13 = 0
replace ndemchange13 = 1 if npid7pre<npid7post

generate nrepchange13 = 0
replace nrepchange13 = 1 if npid7pre>npid7post

generate droppost = 0
replace droppost =1 if npid7post==. 

generate droppost13 = 0
replace droppost13 =1 if npid7post==. & npid7pre~=.
 
generate droppost23 = 0
replace droppost23 =1 if npid7post==. & pid7~=.

gen nrepid7pre = npid7pre
recode nrepid7pre 1=0 2=0 3= 0 4=0 5=1 6=1 7=1 8=. 9=.

gen ndemid7pre = npid7pre
recode ndemid7pre 1=1 2=1 3= 1 4=0 5=0 6=0 7=0 8=. 9=.

gen nrepid7post = npid7post
recode nrepid7post 1=0 2=0 3= 0 4=0 5=1 6=1 7=1 8=. 9=.

gen ndemid7post = npid7post
recode ndemid7post 1=1 2=1 3= 1 4=0 5=0 6=0 7=0 8=. 9=.

gen nindid7post = npid7post
recode nindid7post 1=0 2=0 3= 0 4=1 5=0 6=0 7=0 8=. 9=. 
 

*** date taking the survey
gen datepre1 = date(var87, "MDYhms")
 
 encode timepost2, generate (dayspost)
 
 encode timpre2, generate (dayspre)

 **** Placebo
gen placebodum = 0
replace placebodum =1 if number <299 

** time trends 

gen timestart = starttime - 1925498757000
gen ltimestart  = ln(timestart) +1

gen timeend = endtime-1925499142000
 
gen ltimeend = ln(timeend)

 gen postcoup9te = postcoup9*timeend
 gen postcoup9lte = postcoup9*ltimeend 
 

 gen postcoup9lts = postcoup9*ltimestart

 **age by category **
 
gen vyoung1 = 0
replace vyoung1 =1 if age<25

gen young1 = 0
replace young1 =1 if age>24 & age <35

gen mid1 = 0
replace mid1 =1 if age>34 & age <45

gen midmid1 = 0
replace midmid1 =1 if age>44 & age <55

gen latemid1 = 0
replace latemid1 =1 if age>54 & age <65

gen old1 = 0
replace old1 = 1 if age>65

gen postcoup9mod = postcoup9*moderate

 
gen oldpidpostcoup = npid7pre*postcoup9
gen nrepid7prepostcoup9 = nrepid7pre*postcoup9
gen    nindid7pre = npid7pre
recode nindid7pre 4= 1 1=0 2=0 3= 0 5=0 6=0 7=0
gen npid7prepostcoup = npid7pre*postcoup9
gen nindid7prepostcoup = nindid7pre*postcoup9



*****************************************************************************

***TABLE 1. Published version 4 analyses*** October 2023 **

***PARTY ID **
reg repid7 postcoup9  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


*****TABLE 2 TRUMP THERMOMETER **************
reg trumpthermall postcoup9  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

*****TABLE 3 IDEOLOGY ********
reg ideo5 postcoup9  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

 

**** TABLE 4 Changes in Party ID After the January Survey 


tab npid7pre pid7

tab pid7 npid7post


*************************************************************************************


*****APPENDIX 1 Balance tests***
ttest age, by (postcoup9)
ttest educ, by (postcoup9)
ttest male, by (postcoup9)
ttest familyinc, by (postcoup9)
ttest white, by (postcoup9)
ttest hispanic, by (postcoup9)
ttest black, by (postcoup9)
ttest Trumpvote, by (postcoup9)
ttest trumpthermall, by (postcoup9)
ttest inc1, by (postcoup9)
ttest inc2, by (postcoup9)
ttest inc3, by (postcoup9)
ttest inc4, by (postcoup9)
ttest inc5, by (postcoup9)
ttest churchatd, by (postcoup9)
ttest bornagain, by (postcoup9)
ttest pew_religimp, by (postcoup9)
ttest selfemployed, by (postcoup9)
ttest south, by (postcoup9)

ttest age if number <597 | number >793, by (postcoup9)
ttest educ if number <597 | number >793, by (postcoup9)
ttest male if number <597 | number >793, by (postcoup9)
ttest familyinc if number <597 | number >793, by (postcoup9)
ttest white if number <597 | number >793, by (postcoup9)
ttest hispanic if number <597 | number >793, by (postcoup9)
ttest black if number <597 | number >793, by (postcoup9)
ttest Trumpvote  if number <597 | number >793, by (postcoup9)
ttest trumpthermall if number <597 | number >793, by (postcoup9)
ttest inc1 if number <597 | number >793, by (postcoup9)
ttest inc2 if number <597 | number >793, by (postcoup9)
ttest inc3 if number <597 | number >793, by (postcoup9)
ttest inc4 if number <597 | number >793, by (postcoup9)
ttest inc5 if number <597 | number >793, by (postcoup9)
ttest churchatd if number <597 | number >793, by (postcoup9)
ttest bornagain if number <597 | number >793, by (postcoup9)
ttest pew_religimp if number <597 | number >793, by (postcoup9)
ttest selfemployed if number <597 | number >793, by (postcoup9)
ttest south if number <597 | number >793, by (postcoup9)

***ONLINE APPENDIX 1 shows model with all controls ***

**** ONLINE APPENDIX 2  without prior party id to increase the sample size****
 
reg repid7 postcoup9 age male educ     white hispanic ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2a", word append ctitle (RepId)
reg repid7 postcoup9 age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2a", word append ctitle (RepId)
reg repid7 postcoup9 age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2a", word append ctitle (RepId)
reg repid7 postcoup9 age male educ     white hispanic  if Trumpvote ==1 & void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2a", word append ctitle (RepId)

reg trumpthermall postcoup9 age male educ     white hispanic   ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2b", word append ctitle (Trumpthermall)
reg trumpthermall postcoup9 age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2b", word append ctitle (Trumpthermall)
reg trumpthermall postcoup9 age male educ     white hispanic  if Trumpvote ==1,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2b", word append ctitle (Trumpthermall)
reg trumpthermall postcoup9 age male educ     white hispanic  if Trumpvote ==1 & void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2b", word append ctitle (Trumpthermall)
 
reg ideo5 postcoup9 age male educ     white hispanic   ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2c", word append ctitle (Ideology)
reg ideo5 postcoup9 age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2c", word append ctitle (Ideology)
reg ideo5 postcoup9 age male educ     white hispanic  if Trumpvote ==1,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2c", word append ctitle (Ideology)
reg ideo5 postcoup9 age male educ     white hispanic  if Trumpvote ==1 & void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised2c", word append ctitle (Ideology)


 *** ON LINE APPENDIX 3  rare events Logit of Repid ***
relogit repid7 postcoup9 age male educ     white hispanic ,   
*outreg2 using "C:\Users\timfr\Dropbox\revised3a", word append ctitle (RepId)
relogit repid7 postcoup9 age male educ     white hispanic  if void==0 ,   
*outreg2 using "C:\Users\timfr\Dropbox\revised3a", word append ctitle (RepId)
relogit repid7 postcoup9 age male educ     white hispanic  if Trumpvote ==1 ,   
*outreg2 using "C:\Users\timfr\Dropbox\revised3a", word append ctitle (RepId)
relogit repid7 postcoup9 age male educ     white hispanic  if Trumpvote ==1 & void==0 , 
*outreg2 using "C:\Users\timfr\Dropbox\revised3a", word append ctitle (RepId)
 
 
 ****************Weighted Versions of Main results ****
 
 ** ON LINE APPENDIX 4. DATA WEIGHTED USING ACS***
 
reg repid7 postcoup9  npid7pre age male educ  white hispanic    [pweight = weight_acs_all_2020]   , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised4a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic  [pweight = weight_acs_all_2020] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic  [pweight = weight_acs_all_2020]     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised4b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if void==0 ,  robust cluster (inputstate)
*outreg using "C:\Users\timfr\Dropbox\revised4b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4b", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic [pweight = weight_acs_all_2020]      , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised4c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised4c", word append ctitle (Ideology)



***ON LINE APPENDIX 5: DATA WEIGHTED USING BLS

reg repid7 postcoup9  npid7pre age male educ  white hispanic [pweight = weight_bls_emp_01]      , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised5a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic [pweight = weight_acs_all_2020] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic [pweight = weight_bls_emp_01]    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised5b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5b", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic [pweight = weight_bls_emp_01]       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised5c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised5c", word append ctitle (Ideology)



**** ONLINE APPENDIX 6 USING YOUGOV WEIGHT = weight 

reg repid7 postcoup9  npid7pre age male educ  white hispanic [pweight = weight]      , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised6a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic [pweight = weight] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic [pweight = weight] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic [pweight = weight] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic [pweight = weight]    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised6bbb", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic [pweight = weight] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6bbb", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6bbb", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic [pweight = weight] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6bbb", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic [pweight = weight]       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised6c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic [pweight = weight] if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight_bls_emp_01] if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic [pweight = weight] if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised6c", word append ctitle (Ideology)


***ONLINE APPENDIX 7  REPUBLICAN IDENTIFIERS CONTROLLING FOR PRIOR REPUBLICAN IDENTIFICATION
***interacting past party id with exposure to the coup
 
reg repid7 postcoup9  nrepid7pre nrepid7prepostcoup9  age male educ     white hispanic ,  robust cluster (inputstate)

reg repid7 postcoup9  nrepid7pre nrepid7prepostcoup9  age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)

*********************************



*** Online APPENDIX 8  
probit postcoup9 age educ male familyinc white hispanic selfemployed Trumpvote, robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\balance1", replace ctitle (model 1) 


dprobit postcoup9 age male educ  white hispanic black familyinc selfemployed churchatd  Trumpvote missinc south if number<597 | number>793, robust  
*outreg2 using "C:\Users\timfr\Dropbox\balance8", word replace ctitle (model 1) 

dprobit postcoup9 age male educ  white hispanic black familyinc selfemployed churchatd  missinc south if Trumpvote==1 & number<597 | number>793, robust  
*outreg2 using "C:\Users\timfr\Dropbox\balance7", word replace ctitle (model 2)



**robust checks: region

reg repid7 postcoup9  npid7pre age male educ  white hispanic   midwest south west     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic midwest south west  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic midwest south west   if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic midwest south west  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic  midwest south west      , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ  midwest south west    white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ  midwest south west    white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ  white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)



reg ideo5 postcoup9  npid7pre age male educ  white hispanic   midwest south west     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic midwest south west  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic midwest south west  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic midwest south west  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)



***robust checks: timezone
reg repid7 postcoup9  npid7pre age male educ  white hispanic   pacific mountain central    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic  pacific mountain central if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic pacific mountain central  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic pacific mountain central  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic   pacific mountain central    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ   white hispanic pacific mountain central if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic  pacific mountain central if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic  pacific mountain central if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic   pacific mountain central    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic pacific mountain central  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic pacific mountain central if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic pacific mountain central  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)


********robust checks: time trend 1
reg repid7 postcoup9  npid7pre age male educ  white hispanic   ltimeend    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic ltimeend if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic ltimeend if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic ltimeend  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic   ltimeend    , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic ltimeend if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic ltimeend if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic ltimeend if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic    ltimeend   , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic ltimeend if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic ltimeend if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic ltimeend if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)


**** robust check: time trend 2

reg repid7 postcoup9  npid7pre age male educ  white hispanic   ltimestart     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic ltimestart  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic ltimestart  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic ltimestart   if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup9  npid7pre age male educ  white hispanic  ltimestart      , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic ltimestart   if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic ltimestart  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic ltimestart  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


reg ideo5 postcoup9  npid7pre age male educ  white hispanic   ltimestart     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic ltimestart  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic ltimestart  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic ltimestart  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)


***robust check: probit ologit

dprobit repid7 postcoup9  npid7pre age male educ  white hispanic       , robust   
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
dprobit repid7 postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

dprobit repid7 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

dprobit repid7 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


ologit trumpthermall postcoup9  npid7pre age male educ  white hispanic       , robust   
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
ologit trumpthermall postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
ologit trumpthermall postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

ologit trumpthermall postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


ologit ideo5 postcoup9  npid7pre age male educ  white hispanic       , robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
ologit ideo5 postcoup9 npid7pre age male educ     white hispanic  if void==0 ,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
ologit ideo5 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

ologit ideo5 postcoup9  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust  
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)


****robust checks:8 PM cutoff

reg repid7 postcoup8  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup8 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup8  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup8 npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup8 npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup8 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup8  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup8  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


reg ideo5 postcoup8  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup8 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup8  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup8  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

****robust checks:7 PM cutoff

reg repid7 postcoup7  npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup7 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup7  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup7 npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)


reg trumpthermall postcoup7 npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup7 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup7  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup7  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)


reg ideo5 postcoup7 npid7pre age male educ  white hispanic       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup7 npid7pre age male educ     white hispanic  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup7  npid7pre age male educ     white hispanic  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup7  npid7pre age male educ     white hispanic  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

***controlling for date or prior survey ***

 
reg repid7 postcoup9  npid7pre age male educ  white hispanic  dayspre   , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word replace ctitle (RepID)
 
reg repid7 postcoup9 npid7pre age male educ     white hispanic dayspre  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg repid7 postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1a", word append ctitle (RepId)

reg trumpthermall postcoup9  npid7pre age male educ  white hispanic dayspre       , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word replace ctitle (TrumpTherm)
 
reg trumpthermall postcoup9 npid7pre age male educ     white hispanic dayspre  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)
 
reg trumpthermall postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

reg trumpthermall postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1b", word append ctitle (TrumpTherm)

 
reg ideo5 postcoup9  npid7pre age male educ  white hispanic   dayspre     , robust cluster (inputstate) 
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word replace ctitle (Ideology)
  
reg ideo5 postcoup9 npid7pre age male educ     white hispanic dayspre  if void==0 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)
 
reg ideo5 postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 ,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)

reg ideo5 postcoup9  npid7pre age male educ     white hispanic dayspre  if Trumpvote ==1 & void==0,  robust cluster (inputstate)
*outreg2 using "C:\Users\timfr\Dropbox\revised1c", word append ctitle (Ideology)



*****sensitive questions
dprobit missinc postcoup9 age male educ white hispanic if void==0, robust
dprobit missinc postcoup9 age male educ white hispanic if  repid ==1 &void==0, robust  
dprobit missinc postcoup9 age male educ white hispanic if  Trumpvote ==1 &void==0, robust

reg ballotinsec postcoup9 age male educ white hispanic if void==0, robust cluster (inputstate)
reg ballotinsec postcoup9 age male educ white hispanic if  repid ==1 &void==0, robust cluster (inputstate)  
reg ballotinsec postcoup9 age male educ white hispanic if  Trumpvote ==1 &void==0, robust cluster (inputstate)

reg elecfree postcoup9 age male educ white hispanic if void==0, robust cluster (inputstate)
reg elecfree postcoup9 age male educ white hispanic if  repid ==1 &void==0, robust  cluster (inputstate)
reg elecfree postcoup9 age male educ white hispanic if  Trumpvote ==1 &void==0, robust cluster (inputstate)
